package com.example.demo.service;

import com.example.demo.model.User;
import org.springframework.stereotype.Service;


public interface AuthService {
    public void register(User user);
    public String login(String name, String password);
    public String encryptPassword(String password);
    public String generateToken(Long userId);
    public void addDishToUser(Long userId, Long dishId);
    public void shareDishWithUser(Long userId, Long dishId, Long otherUserId);
    public void addViewDishToUser(String name, Long dishId);

    public User findByName(String username);

    int insert(User newUser);

    int update(User existingUser);

    int updateByPrimaryKey(User user);
}
